package com.formula.datastructure.exercise.graph.undirect;

public class ListEdge {
    public int fromIdx;
    public int toIdx;
    public ListEdge nextEdge;
    public Integer weight;

    public ListEdge(int to, Integer weight) {
        this.toIdx = to;
        this.nextEdge = null;
        this.weight = weight;
    }

    public ListEdge(int from, int to, Integer weight) {
        this.fromIdx = from;
        this.toIdx = to;
        this.nextEdge = null;
        this.weight = weight;
    }
}
